geom_vline(xintercept = 18.06, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey45") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "dark grey", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "darkgrey", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "darkred", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "darkred", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Parasite Prevalence") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Type Frequency") +
labs(color = "Recovery Rate") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Class Frequency") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
tiff("./Figures/Figure S3/Figure S3 SIR Panel.tiff", units="in", width = 15, height = 4, res=300)
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Class Frequency") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
dev.off()
tiff("./Figures/Figure S3/Figure S3 SIR Panel.tiff", units="in", width = 15, height = 4, res=300)
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Class Frequency") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
dev.off()
tiff("~/Figures/Figure S3/Figure S3 SIR Panel.tiff", units="in", width = 15, height = 4, res=300)
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Class Frequency") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
dev.off()
setwd("/Volumes/Photos")
setwd("/Volumes/Photos/Project/")
####Figure S3 - Recovery Rate Range figure####
single_bottleneck_data <- read.csv(file = "./output/figure_s3_single_bottleneck_data.csv", header = TRUE)
recurring_bottleneck_data <- read.csv(file = "./output/figure_s3_recurring_bottleneck_data.csv", header = TRUE)
SIRDF <- recurring_bottleneck_data %>%
select(Timepoint, S, I, R, InitialPrevalence, TimeTillBottleneckMean, BirthRate, TransmissionRate, RecoveryRate) %>%
filter(RecoveryRate == 0.001) %>%
mutate(ScalingFactor = 1 / BirthRate) %>%
mutate(ScaledBirthRate = BirthRate * ScalingFactor) %>%
mutate(ScaledTransmissionRate = TransmissionRate * ScalingFactor) %>%
mutate(ScaledRecoveryRate = RecoveryRate * ScalingFactor) %>%
mutate(ScaledTimepoint = Timepoint / ScalingFactor) %>%
mutate(ScaledTimeTillBottleneckMean = TimeTillBottleneckMean / ScalingFactor) %>%
select(ScaledTimepoint, S, I, R, InitialPrevalence, ScaledTimeTillBottleneckMean, ScaledBirthRate, ScaledTransmissionRate, ScaledRecoveryRate, ScalingFactor) %>%
group_by(ScaledRecoveryRate) %>%
mutate(GlobalTime = row_number() / ScalingFactor) %>%
mutate(N = S + I + R) %>%
mutate(SFrequency = S / N,
IFrequency = I / N,
RFrequency = R / N)
tiff("~/Figures/Figure S3/Figure S3 SIR Panel.tiff", units="in", width = 15, height = 4, res=300)
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Class Frequency") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
dev.off()
tiff("./Figures/Figure S3/Figure S3 SIR Panel.tiff", units="in", width = 15, height = 4, res=300)
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Class Frequency") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
dev.off()
tiff("Figure S3 SIR Panel.tiff", units="in", width = 15, height = 4, res=300)
ggplot(data = SIRDF, aes(x = GlobalTime)) +
ylim(0, 1) +
xlim(0, 30) +
geom_ribbon(aes(ymin = 0,
ymax = IFrequency),
fill = "black") +
geom_ribbon(aes(ymin = IFrequency,
ymax = IFrequency + RFrequency),
fill = "darkgrey") +
geom_ribbon(aes(ymin = IFrequency + RFrequency,
ymax = 1),
fill = "grey98") +
geom_vline(xintercept = 3.01, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 6.02, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 9.03, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 12.04, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 15.05, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 18.06, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 21.07, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 24.08, linetype = "dashed", color = "red", linewidth = 0.75) +
geom_vline(xintercept = 27.09, linetype = "dashed", color = "red", linewidth = 0.75) +
xlab("Time") +
ylab("Host Class Frequency") +
theme_minimal() +
theme(axis.text.x = element_text(size = 16),
axis.title.x = element_text(size = 20, face = "bold"),
axis.text.y = element_text(size = 16),
axis.title.y = element_text(size = 20, face = "bold"),
legend.text = element_text(size = 16),
legend.title = element_text(size = 20, face = "bold"))
dev.off()
getVersion()
getRversion()
sessionInfo()
library(ggplot2)
library(dplyr)
library(tidyr)
sessionInfo()
